#include<bits/stdc++.h>
#include <cstring>
using namespace std;
#define maxn 101

struct node
{
    int to,next;
}edge[maxn];

int head[maxn];
int cnt = 0,num = 0;
int dfn[maxn];
int low[maxn];
void add(int u,int v)
{
    edge[++cnt].next = head[u];
    edge[cnt].to = v;
    head[u] = cnt;
}

void tarjan(int u,int fa)
{
    dfn[u] = low[u] = ++num;
    for(int i = head[u];i;i = edge[i].next)
    {
        int v = edge[i].to;
        if(v==fa)
        {
            continue;
        }
        if(!dfn[v])
        {
            tarjan(v,u);
            low[u] = min(low[u],low[v]);
            if(low[v]>dfn[u])
            {
                cout<<u<<"-"<<v<<"是桥"<<endl;
            }
        }
        else {
            low[u] = min(low[u],dfn[v]);
        }
    }
}

int main()
{
    memset(head,0,sizeof(head));
    memset(low,0,sizeof(low));
    memset(dfn,0,sizeof(dfn));
    int m,n;
    cin>>m>>n;
    int x,y;
    for(int i = 0;i < m;i++)
    {
        cin>>x>>y;
        add(x,y);
        add(y,x);
    }
    for(int i = 1;i<=n;i++)
    {
        if(!dfn[i])
        {
            tarjan(i, 0);
        }
    }
}
